<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title></title>
<script type="text/javascript">
function validar(){
	var nom= document.getElementById('nombre').value;
	if(nom !='') {
		document.form1.submit();
	}
}
function validaVacios(val){
	var box = document.getElementById(val.id);
	if(val.value==""){
		box.style.backgroundColor ='#ffbb00';
	}
	else{box.style.backgroundColor ='';}
}

</script>
</head>

<body>
<form id="form1" name="form1" method="post" action="index.php?action=guardar&module=eventos">
  <table width="200" border="1">
    <tr>
      <th scope="col" colspan="2">Eventos</th>

    </tr>
    <tr>
      <th scope="row">ID</th>
      <td><label>
        <input type="text" name="id" id="id" value="<?=@$evento->id ?>" readonly/>
      </label></td>
    </tr>
    <tr>
      <th scope="row">Nombre</th>
      <td><input type="text" name="nombre" id="nombre" value="<?=@$evento->nombreEvento ?>" onblur="validaVacios(this)"/></td>
    </tr>
    <tr>
      <th scope="row">Descripcion</th>
      <td><input type="text" name="descripcion" id="descripcion" value="<?=@$evento->descripcion ?>" onblur="validaVacios(this)"/></td>
    </tr>
    <tr>
      <th scope="row" colspan="2"><label>
        <input type="submit" name="Enviar" value="enviar"  id="enviar" onclick="validar()"/>
        <input type="button" name="Cancelar" value="cancelar" id="cancelar" onclick="
  window.location.assign('index.php')" />
      </label></th>

    </tr>
  </table>
</form>
</body>
</html>
